package org.example.elm_xiangmu.service.impl;


import org.example.elm_xiangmu.controller.DeliveryAddressController;
import org.example.elm_xiangmu.mapper.DeliveryAddressMapper;
import org.example.elm_xiangmu.po.DeliveryAddress;
import org.example.elm_xiangmu.service.DeliveryAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeliveryAddressImpl  implements DeliveryAddressService {
    @Autowired
    DeliveryAddressMapper deliveryAddressMapper;
    @Override
    public List<DeliveryAddress> listDeliveryAddressByUserId(String userId) {
        return deliveryAddressMapper.listDeliveryAddressByUserId(userId);
    }

    @Override
    public List<DeliveryAddress> getDeliveryAddressById(String daId) {
        return deliveryAddressMapper.getDeliveryAddressById(daId);
    }

    @Override
    public void saveDeliveryAddress(DeliveryAddress deliveryAddress) {
        deliveryAddressMapper.saveDeliveryAddress(deliveryAddress);
    }

    @Override
    public void updateDeliveryAddress(DeliveryAddress deliveryAddress) {
        deliveryAddressMapper.updateDeliveryAddress(deliveryAddress);
    }

    @Override
    public void removeDeliveryAddress(Integer daId) {
        deliveryAddressMapper.removeDeliveryAddress(daId);
    }
}
